<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta
      name="viewport"
      content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=0"
    />
    <meta http-equiv="X-UA-Compatible" content="ie=edge" />
    <title>Document</title>
    <script src="https://cdn.bootcss.com/vue/2.6.11/vue.min.js"></script>
  </head>
  <body>
    <div id="root">
      <div v-for="(item ,key ,index) in goods">
        <div>{{key}}</div>
        <div>{{index}}</div>
        <div>{{item.price}}</div>
      </div>
    </div>
    <script>
      Vue.config.productionTip = false; //组织vue在启动是生成生产提示
      let vm = new Vue({
        el: "#root",
        // 属性数据
        data: {
          goods: {
            iphonex: { price: 10000 },
            iphone8: { price: 8000 },
            iphone6: { price: 6000 },
          },
        },
        // 计算
        computed: {},
        // 方法
        methods: {},
        // 监视
        watch: {},
      });
    </script>
  </body>
</html>
